<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <script type="text/javascript" src="assets/js/jquery.min.js"></script>
    <style>
        .showinfo {
            width: 250px;
            height: 0;
            position: fixed;
            right: 0;
            bottom: 0;
            background-color: #fff;
            border: 1px solid #aaa;
            border-radius: 5px;
        }

        .showinfo span {
            display: block;
            clear: both;
            margin-left: 5px;
            font-size: 14px;
            margin-top: 10px;
        }

        .showinfo a {
            color: blue;
            float: right;
            margin-top: 3px;
            font-size: 12px;
            margin-right: 3px;
            text-decoration: none;
        }
    </style>
    <script>
        var result = [{"id": "a1", "text": "恭喜上传成功！"}, {"id": "a2", "text": "恭喜上传成功2！"}];
        var _hasinfo = [];
        var showdiv = "";
        var no = 0;

        function upResilt() {
            var _textinfo = $("p").html();
            alert($("p").html());
            $("p").html(ToDBC(_textinfo.toString()));
            //_hasinfo = result;
        }
        window.onload = function () {
            var showinfo = setInterval("showDiv()", 3000);
        }

        function showDiv() {
            if (_hasinfo.length != 0) {
                if (no < _hasinfo.length) {
                    showdiv = "<div class='showinfo showinfo" + _hasinfo[no].id + "' id='" + _hasinfo[no].id + "'>" +
                            "<div><a href='JavaScript:void(0)' onclick='closeDiv(\"" + _hasinfo[no].id + "\")'>关闭</a></div>" +
                            "<span>" + _hasinfo[no].text + "</span>" +

                            "</div>";
                    var oDiv = document.createElement('div');
                    oDiv.innerHTML = showdiv;
                    document.body.appendChild(oDiv);
                    $(".showinfo").animate({height: "180px"});
                    no++;
                }
            }
        }

        function closeDiv(a) {
            $("#" + a).remove();
        }



        function saveOrchange(){
            var _textinfo = $("p").html();
            $("p").html(ToDBC(_textinfo.toString()));
        }
        function ToDBC(txtstring) {
            var tmp = "";
            for (var i = 0; i < txtstring.length; i++) {
                if (txtstring.charCodeAt(i) == 32) {
                    tmp = tmp + String.fromCharCode(12288);
                }
                else {
                    tmp = tmp + txtstring[i];
                }
            }
            return tmp;
        }
    </script>
</head>
<body>
<div>
    <button onclick="upResilt();">点击导入</button>
</div>
<p>wodasd asd asd asd asd asd a asdasdasd                       asd </p>
</body>
</html>